<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no"/>
	<title>客户经营</title>
	<link rel="stylesheet" href="css/lt_common.css">
	<link rel="stylesheet" href="css/customer_busness.css">
</head>
<body>
	<div class="page">
		<div class="bg_content">
			<div class="per_num"><span>0</span>人</div>
			<div class="share_num"><span>0</span>次</div>
		</div>
		<ul class="rank_list">
		</ul>
		<div id="wrapper">
			<div class="list_content"  id="scroller">
				<ul class="list_title">
					<li>头像</li>
					<li>时间</li>
					<li>奖金</li>
					<li>充值成功</li>
					<li></li>
				</ul>
				<ul class="list_detials clear"  id="thelist">
					<div id="pullUp">
						<span class="pullUpIcon"></span><span class="pullUpLabel">加载更多》</span>
					</div>
				</ul>
			</div>
		</div>
	</div>
</body>
</html>
<script src="js/jquery.js"></script>
<script src="js/common.js"></script>
<script src="js/iscroll.js"></script>
<script src="js/customer_busness.js"></script>
<script>
	$(function(){
		customerFun();
	})
	var myScroll,
	pullUpEl, pullUpOffset;

function pullUpAction () {
	setTimeout(function () {	// <-- Simulate network congestion, remove setTimeout from production!
		ListFun();
		
		myScroll.refresh();		// Remember to refresh when contents are loaded (ie: on ajax completion)
	}, 1000);	// <-- Simulate network congestion, remove setTimeout from production!
}

function loaded() {
	pullUpEl = document.getElementById('pullUp');	
	pullUpOffset = pullUpEl.offsetHeight;
	
	myScroll = new iScroll('wrapper', {
		useTransition: true,
		onRefresh: function () {
			if (pullUpEl.className.match('loading')) {
				pullUpEl.className = '';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = '加载更多》';
			}
		},
		onScrollMove: function () {
			if (this.y < (this.maxScrollY - 5) && !pullUpEl.className.match('flip')) {
				pullUpEl.className = 'flip';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = '释放刷新...';
				this.maxScrollY = this.maxScrollY;
			} else if (this.y > (this.maxScrollY + 5) && pullUpEl.className.match('flip')) {
				pullUpEl.className = '';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = '加载更多》';
				this.maxScrollY = pullUpOffset;
			}
		},
		onScrollEnd: function () {
			if (pullUpEl.className.match('flip')) {
				pullUpEl.className = 'loading';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = '加载中...';				
				pullUpAction();	// Execute custom function (ajax call?)
			}
		}
	});
	
	setTimeout(function () { document.getElementById('wrapper').style.left = '0'; }, 800);
}

document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);

document.addEventListener('DOMContentLoaded', function () { setTimeout(loaded, 200); }, false);
</script>
